import MockData from './data'
import config from '@UTILS/config'

if (config.env.MOCK === 'true') {
    var Mock = require('mockjs')
}

const main = {
    init: () => {
        if (config.env.MOCK === 'false') {
            return
        }
        if (config.mock) {
            for (let uri in MockData) {
                Mock.mock(uri, MockData[uri])
            }
        }

    }
}


export default main
